package com.hbnu.array;

import java.util.Scanner;

/**
 * 简单数据加密
 *
 * @author chendikai
 * @date 2024-09-09 15:10
 */
public class ArrayDemo02 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int num = scanner.nextInt();

        int ge = num % 10;
        int shi = num / 10 % 10;
        int bai = num / 100 % 10;
        int qian = num / 1000 % 10;
        int wan = num / 10000 % 10;
        int sihwan = num / 100000 % 10;

        int[] numbers = new int[] {sihwan, wan, qian, bai, shi, ge};

        for (int i = 0; i < numbers.length; i++) {
            numbers[i] += 5;     // numbers[i] = numbers[i] + 5;
            numbers[i] %= 10;
        }

        int temp = 0;
        for (int i = 0; i < numbers.length / 2; i++) {
            temp = numbers[i];
            numbers[i] = numbers[numbers.length - 1 - i];
            numbers[numbers.length - 1 - i] = temp;
        }

        for (int i = 0; i < numbers.length; i++) {
            System.out.print(numbers[i]);
        }
    }
}
